home *** CD-ROM | disk | FTP | other *** search
- MD--Memory Diagnostic
- by Fabbian G. Dufoe, III
- 10 January 1989
-
- MD is a simple memory diagnostic program. It allocates as much memory
- as it can, writes a value to it, and reads the value. If the value read is
- not the same as the value MD wrote MD reports an error. It repeats the
- process until each byte of memory has been tested with four test values:
- 0x00, 0xff, 0x55, and 0xaa. The error report identifies the address where
- the bad value was found, the value found, and the value expected.
-
- In addition to the error report MD writes status messages as it runs to
- keep you posted on its progress. Status messages are sent to standard error
- while the error report is sent to standard output. That allows you to
- direct the report to a disk file for later review and printing. The status
- messages won't be included in the report, because standard error is not
- redirected.
-
- MD is designed for the CLI environment. To run it type "MD" at a CLI
- or Shell prompt. You may send the error report to a disk file or an
- AmigaDOS device by redirecting it. For example, you can save the error
- report in MD.rpt by typing "MD >MD.rpt". You can print the report by typing
- "MD >PRT:".
-
- MD does not take over the machine. However, it does allocate memory
- until the system won't give it any more. It starts by asking for 1 MB
- blocks. When the system won't give it any more that size it cuts the
- requested size in half. This process continues until the system won't give
- it any 1-byte blocks.
-
- The next phase is to sort the blocks so the report will be in ascending
- order by address. MD keeps an array with the block pointer and the size of
- the block. Once the array is sorted MD initializes all the blocks with
- zeroes (0x00).
-
- Then it tests each block byte by byte. If the byte is not equal to the
- last value store there MD reports the error. It then assigns the next test
- value before moving on to the next byte. It repeats that process for each
- test value.
-
- When all the memory has been tested with all the test values MD frees
- all the blocks and terminates.
-
- The error report begins with a heading identifying the program, a line
- telling when the test was run, and a list of the blocks examined. For each
- block the report shows the block number, its starting address, and its size
- in bytes. Each error found is listed individually. The reports gives the
- address where the error occurred, the value found at that address, and the
- value expected. Finally the report states the total number of errors found.
-
- MD takes about 8 minutes to test a 2.5MB machine. During that time
- there will not be enough memory left to run other jobs. When MD finishes,
- however, it will release all the memory it used and other jobs can resume
- without rebooting. MD will not interfere with other jobs that are executing
- when it is invoked but it is possible to create a deadlock if there are
- other active jobs in the system. Besides that, MD cannot test memory that
- is allocated to another process. Consequently, it is best to run MD
- immediately after booting the system.
-
- Send questions, comments, or bug reports to:
-
- --Fabbian Dufoe
- 350 Ling-A-Mor Terrace South
- St. Petersburg, Florida 33705
- 813-823-2350
-
- UUCP: ...uunet!pdn!jc3b21!fgd3
-